Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Collaborator
|
수고하셨습니다! |
codeit-kkm
approved these changes
Mar 29, 2025
hyeonjiroh
approved these changes
Mar 29, 2025
Owner
There was a problem hiding this comment.
담당자 부분을 이런 식으로 구현하는 게 좋을 것 같습니다.
드롭다운을 부모 요소에 relative 속성을 주고 드롭다운으로 나오는 담당자 목록 요소에 absolute 부모 요소와 4px 차이 나도록 top을 주는 것이 좋아 보입니다.
다음은 수정해본 코드입니다. 참고 부탁드립니다. 드롭다운을 위에서 말한 것처럼 수정했고, 안의 요소들이 피그마 시안에서는 py-[11px]인데 지혜님 코드에서는 py-2로 되어있어서 함께 수정했습니다.
<div className="flex flex-col w-[271px] gap-6 tablet:w-[520px] tablet:gap-8 relative">
<div className="relative flex flex-col">
<label className="block mb-2.5 text-lg font-medium text-gray-800 tablet:mb-2 tablet:text-2lg">
담당자
</label>
<button
className="w-full px-4 py-3 font-normal text-md text-gray-500 border border-gray-400 rounded-md tablet:py-[11px] tablet:text-lg"
onClick={() => setIsDropdownOpen((prev) => !prev)}
>
<div className="flex justify-between">
<span>{selectedManager || "이름을 입력해 주세요"}</span>
<Image src={dropdownIcon} width={8} height={8} alt="" />
</div>
</button>
{isDropdownOpen && (
<ul className="border border-gray-400 rounded-md w-[271px] tablet:w-[520px] absolute top-[89px] z-10 bg-white">
{managers.map((manager) => (
<li
key={manager}
className="px-4 py-[11px] hover:text-violet hover:bg-violet-8 cursor-pointer"
onClick={() => {
setSelectedManager(manager);
setIsDropdownOpen(false);
}}
>
{manager}
</li>
))}
</ul>
)}
</div>
모달창 높이는 다음에 같이 이야기해봐요! 고생하셨습니다!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#️⃣ Issue Number
#19
📝 요약
할 일 생성 모달 레이아웃 구현 완료했습니다.
레이아웃만 구현한 상태라서 추가 기능들 구현 예정입니다.
레이아웃 구현을 위해 작성한 코드 및 기본 코드들은 추가 기능 구현 완료 후 삭제 예정입니다.
레이아웃 구현에 필요한 Textarea, Input 컴포넌트를 약간 수정했습니다.
Modal에 max-h-[80vh]로 작성되어 있어 피그마 상의 크기보다 조금 작습니다.(상의 후 수정 예정)
🛠️ PR 유형
📷 스크린샷
모바일 버전

담당자 클릭 시
